<template>
	<view class="back">
		<view class="back-btn" @click="goBack">
			<!-- #ifndef MP -->
			<image src="../../static/ic_back_dark_center.png" />
			<!-- #endif -->
			<text>{{ title }}</text>
		</view>

		<view class="ShareSheet" v-if="ShareState">
			<view class="van-cell" @click="showToast">
				<image src="../../static/ic_share_dark.png" />
			</view>
			<!-- <view class="mask" v-if="showShare" @click="showShare = false"></view>
			<view class="van-share-sheet" v-if="showShare">
			
			</view> -->
			<!-- <van-cell @click="showShare = true">
				<image src="../../static/ic_share_dark.png" />
			</van-cell>
			<van-share-sheet v-model="showShare" title="立即分享给好友" :options="options" /> -->
		</view>
	</view>
</template>

<script>
	export default {
		name: "goBack",
		props: ["title"],
		data() {
			return {
				showShare: false,
				ShareState: true
			};
		},
		methods: {
			goBack: function() {
				uni.navigateBack();
			},
			showToast:function(){
				uni.showToast({
					title:'暂不支持',
					icon:'none'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.back {
		height: 50px;
		background: white;
		border-bottom: 1px solid #e9e9e9;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 10px;

		.back-btn {
			display: flex;
			justify-content: center;
			align-items: center;

			image {
				width: 35px;
				height: 35px;
			}

			text {
				font-weight: bold;
				font-size: 18px;
			}
		}

		.ShareSheet {
			.van-cell {
				display: flex;
				justify-content: center;
				align-items: center;

				image {
					width: 25px;
					height: 25px;
				}
			}

			// .mask {
			// 	position:fixed;
			// 	left: 0;
			// 	top: 0;
			// 	background-color: rgba(0, 0, 0, 0.5);
			// 	width: 100%;
			// 	height: 100%;
			// 	z-index: 1;
			// }

			// .van-share-sheet {
			// 	position: fixed;
			// 	left: 0;
			// 	bottom: 0;
			// 	width: 100%;
			// 	height: 40%;
			// 	padding: 10px;
			// 	box-sizing: border-box;
			// 	border-radius: 20px 20px 0 0;
			// 	background-color: white;
			// 	z-index: 3;
			// }
		}
	}
</style>
